package com.tceasy.gateway.api;

public class SystemFailException extends RuntimeException {
	private Response response;

    public SystemFailException(String message) {
		super(message);
        this.response=Response.SYSTEM_FAIL().msg(message);
    }
    public SystemFailException(Throwable cause) {
        super(cause);
    }

    public SystemFailException(Response response){
        this.response=response;
    }

    public String toJson(){
        return response.toJson();
    }

    public Response getResponse() {
        return response;
    }

    public void setResponse(Response response) {
        this.response = response;
    }

}
